package com.hs.hlw.credit.system.business.dto;

import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;
import org.hibernate.validator.constraints.NotEmpty;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.math.BigInteger;

/**
 * SysConfigDto
 * @author zhb
 * @date 2018/10/29
 */
public class SysConfigDto {
    @Data
    public static class Add {
        @NotBlank(message = "英文名未填写")
        private String englishName;
        @NotBlank(message = "中文名未填写")
        private String chineseName;
        @NotNull(message = "未选择类型")
        @Range(min = 1, max = 6, message = "选择的类型不存在")
        private int type;
        @NotBlank(message = "未填写值")
        private String value;
        private String remark;
    }

    @Data
    public static class Update {
        @NotNull(message = "id未填写")
        private Integer id;
        @NotBlank(message = "英文名未填写")
        private String englishName;
        @NotBlank(message = "中文名未填写")
        private String chineseName;
        @NotNull(message = "未选择类型")
        @Range(min = 1, max = 6, message = "选择的类型不存在")
        private Short type;
        @NotBlank(message = "未填写值")
        private String value;
        private String remark;
    }
}